<?php

require_once "../lib/nusoap/lib/nusoap.php";

$client = new soapclient("http://localhost/spidercrawler/trunk/SpiderBot/WebServices/server_book.php");
$response = $client->call('getallbook');
if($client->fault)
{
   echo "FAULT: <p>Code: (".$client->faultcode.")</p>";
   echo "String: ".$client->faultstring;
}
else
{
   $r = $response;
   $count = count($r);
   ?>

    <table border="1">
    <tr>
       <th>Code</th>
       <th>Title</th>        
       <th>Author</th>        
       <th>Publisher</th>        
    </tr>

    <?php
    for($i=0;$i<=$count-1;$i++){
   ?>
    <tr>
       <td><?=$r[$i]['cd']?></td>
       <td><?=$r[$i]['title']?></td>
       <td><?=$r[$i]['author']?></td>                
       <td><?=$r[$i]['publisher']?></td>        
    </tr>
    <?php
   }
   ?>
    </table>
    <?php

}
?>

